package com.qf.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsGoodsMapper;
import com.qf.pojo.DtsGoods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author sunyamei
 * @version V1.0
 * @Project javase2203
 * @Package com.qf.service
 * @Description:
 * @Date 2022/7/26 11:35
 */
@Service
public class GoodServiceImpl  implements  GoodService{

   @Autowired
   private DtsGoodsMapper goodsMapper;

    @Override
    public int goodCount() {
        //创建查询条件对象
        QueryWrapper<DtsGoods> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("deleted", false);

        Integer count = goodsMapper.selectCount(queryWrapper);
        return count;
    }
}
